//
//  Mediator+Consume.m
//  JinFuThree
//
//  Created by 爱尚 on 2018/8/29.
//  Copyright © 2018年 毛韶谦. All rights reserved.
//

#import "Mediator+Consume.h"

NSString *const ConsumeTarget = @"ConsumeAction";
NSString *const ConsumeActionMainViewController = @"mainViewController";
NSString *const ConsumeActionGoodsDetailViewController = @"goodsDetailViewController:";
@implementation Mediator (Consume)

-(UIViewController*_Nullable)Consume_mainViewController{
    
    MediatorOptions *options = [MediatorOptions optionsWithTargetName:ConsumeTarget actionName:ConsumeActionMainViewController];
    return [self performWithOptions:options];
    
}

-(nonnull UIViewController*)Consume_goodsDetailViewController:(nonnull NSString *)goodsId{
    
    MediatorOptions *options = [MediatorOptions optionsWithTargetName:ConsumeTarget actionName:ConsumeActionGoodsDetailViewController];
    options.parameters = @{@"goodsId": goodsId};
    return [[Mediator sharedInstance] performWithOptions:options];
}

@end
